<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>

<xsl:template match="club">
    <html>
	    <head>
		    <link rel="stylesheet" type="text/css" href="../css/club.css"/>
			<script language="javascript">
			    function displayOrNot(xmlObject) {
				    member = xmlObject.attributes["class"].value;
				    targetObject = xmlObject.nextSibling;
					targetObject = targetObject.nodeName == "#text" ? targetObject.nextSibling : targetObject;
					targetObject.style.display = (targetObject.style.display == "block"?"none":"block");
					xmlObject.style.background = "url(../images/bbs/" + member + (targetObject.style.display == "none" ? "_close" : "_open") + ".gif) no-repeat left center";
				}
			</script>
		</head>
	    <xsl:apply-templates select="forum"/>
	</html>
</xsl:template>

<xsl:template match="forum">
    <div>
	    <div class="forum" onclick="displayOrNot(this)">
		    <xsl:value-of select="@name"/>
		</div>
		<div class="forum_detail">
		    <xsl:apply-templates select="//board[@parentId = current()/@componentId]"/>
		</div>
	</div>
</xsl:template>

<xsl:template match="board">
    <ul class="board" onclick="displayOrNot(this)">
	    <p><xsl:value-of select="@name"/></p>
    </ul>
	<ul class="board_detail">
		<xsl:apply-templates select="//subBoard[@parentId = current()/@componentId]"/>
	</ul>
</xsl:template>

<xsl:template match="subBoard">
    <li class="subBoard">
	    <a href="javascript:pageForward({@componentId})"><xsl:value-of select="@name"/></a>
	</li>
</xsl:template>

</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="Club.xml" htmlbaseurl="" outputurl="Club.html" processortype="msxml" useresolver="no" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->